#include "ParticlesPoint.h"
#include <windows.h>
#include <gl/gl.h>
#include <iostream>
using namespace std;

CParticles::CParticles(void): m_arrayOfParticles(this, 0), m_numberOfParticles(0), m_size(3)
{}

CParticles::~CParticles(void){}

void CParticles::doRender(void)
{
	float* temp=m_arrayOfParticles.getValue();
	if(temp!=0)
	{
		glPointSize(m_size);
		glVertexPointer(3, GL_FLOAT, NUMBER_OF_ELEMENT_PER_PARTICLE*sizeof(int),temp);
		glEnableClientState(GL_VERTEX_ARRAY);
		glDrawArrays(GL_POINTS, 0, m_numberOfParticles);
		glDisableClientState(GL_VERTEX_ARRAY);
	}
}